/**
 * @author scylla
 * @version V1.0
 * @Project echo-java-base
 * @Title 副本数值检查者
 * @Description *
 * @Package concurrent.mthread.synchronizeCodeBlock
 * @Since 2021/8/18 2:58 下午
 */
package concurrent.mthread.synchronizeCodeBlock;

public class PiarChecker implements Runnable {
    private PairManager pm;

    public PiarChecker(PairManager pm) {
        this.pm = pm;
    }

    @Override
    public void run() {
        for (; ; ) {
            pm.checkCounter.incrementAndGet();
            pm.getPair().checkState();
        }
    }
}
